<?php
/**
 * Created by PhpStorm.
 * User: chenxiaogang
 * Date: 2017/11/30
 * Time: 18:24
 */

namespace User\Model;


use Common\Model\CommonModel;

class Role extends CommonModel
{
    protected $trueTableName='cmf_role';

    /**
     * @use          [查询指定角色名称前缀的角色ID列表]
     * @author       chenxiaogang
     * @param $like
     * @return mixed
     */
    public function getRoleIdsByLike($like)
    {
        $data = $this->where(['status'=>1,'name'=>['like',$like.'%']])->getField('id',true);
        return $data;
    }
}